package com.lrs.java.j2se_self.thread;

public class TestPriority {
	public static void main(String[] args){
		Mythread1 t1 = new Mythread1();
		Mythread3 t3 = new Mythread3();
		Thread t2 = new Thread(t3);
		t1.setPriority(Thread.NORM_PRIORITY + 3);
		t1.start();t2.start();
	}
}

class Mythread1 extends Thread{
	public void run(){
		for(int i=0;i<1000;i++){
			System.out.println("t1"+" " +i);
		}
	}
}
class Mythread3 implements Runnable{
	public void run(){
		for(int i=0;i<1000;i++){
			System.out.println("----"+i);
		}
	}
}